package com.gagakuai.demo.configde;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/*
 * @program: settement
 * @description:
 * @author: houhong
 * @create: 2022-11-13 15:17
 */
public class Main {

    public static void main(String[] args) {

        AnnotationConfigApplicationContext applicationContext = new AnnotationConfigApplicationContext(MainConfig.class);

        Service3 service3 = (Service3)applicationContext.getBean("service3");
        Service4 service4 = (Service4)applicationContext.getBean("service4");

        System.out.println(applicationContext.getBean(MainConfig.class));

        System.out.println(service3.getService4().equals(service4));


    }
}